﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Support.ascx.cs" Inherits="controls_admin_Support" %>
<div id="box-tabs" class="box">
    <asp:Literal ID="ltrScript" runat="server" Text="" />
    <script type="text/javascript">
        $(document).ready(function () {
            $('#box-tabs').tabs({
                show: function () {
                    var newIdx = $('#box-tabs').tabs('option', 'selected');
                    $('#theHiddenTabIndex').val(newIdx);
                },
                selected: previouslySelectedTab
            });
            $('#btnAdd').click(function () {
                $("#<%=hdfAdd.ClientID %>").val("1");
                $("#<%=txtYahoo.ClientID %>").val("");
                $("#<%=txtName.ClientID %>").val("");
            });
        });           
    </script>
    <asp:HiddenField Value="0" ID="hdfAdd" runat="server" />
    <input type="hidden" value="0" id="theHiddenTabIndex" name="theHiddenTabIndex" />
    <!-- box / title -->
    <div class="title">
        <h5>
            Hỗ trợ trực tuyến</h5>
        <ul class="links">
            <li><a href="#box-1">Danh Sách Bàn Trợ Giúp</a></li>
            <li><a href="#box-2">Hỗ Trợ Viên</a></li>
        </ul>
    </div>
    <div id="divMessage" runat="server" />
    <!-- box / title -->
    <div id="box-1">
        <div class="table">
            <table>
                <asp:Repeater ID="rptSupport" runat="server" OnItemCommand="rptAdvertise_ItemCommand">
                    <HeaderTemplate>
                        <thead>
                            <tr>
                                <th>
                                    STT
                                </th>
                                <th>
                                    Tên bàn hỗ trợ
                                </th>
                                <th>
                                    Yahoo
                                </th>
                                <%--<th>
                                    Số điện thoại
                                </th>--%>
                                <th>
                                    Sửa
                                </th>
                                <th class="last">
                                    Xóa
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td align="center">
                                <%#Container.ItemIndex +1%>
                            </td>
                            <td align="center">
                                <%#Eval("NAME") %>
                            </td>
                            <td align="center">
                                <%#Eval("YAHOO")%>
                            </td>
                            <%--  <td align="center">
                                <%#Eval("PHONE")%>
                            </td>--%>
                            <td align="center">
                                <a href='<%#"default.aspx?module=support&index="+(Container.ItemIndex +1).ToString()%>'
                                    title="Chỉnh Sửa">
                                    <img src="../Resources/icons/16x16/edit.png" class="icon-32-edit" />
                                </a>
                            </td>
                            <td class="last" align="center" valign="top">
                                <asp:Button ID="rbtnDel" CommandName="del" runat="server" CssClass="icon-32-delete"
                                    BackColor="Transparent" BorderStyle="None" UseSubmitBehavior="false" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </tbody>
                    </FooterTemplate>
                </asp:Repeater>
            </table>
        </div>
    </div>
    <div id="box-2">
        <div class="form">
            <div class="fields" style="left: 300px;">
                <div class="field first-field">
                    <div class="label">
                        <label for="input-small">
                            Hỗ trợ viên :</label>
                    </div>
                    <div class="input">
                        <asp:TextBox ID="txtName" runat="server" CssClass="medium" MaxLength="50" />
                        <div class="note">
                            Nhập tên hỗ trợ viên .
                        </div>
                    </div>
                </div>
                <div class="field">
                    <div class="label">
                        <label for="input-small">
                            Yahoo :</label>
                    </div>
                    <div class="input">
                        <asp:TextBox ID="txtYahoo" runat="server" CssClass="medium" MaxLength="20" />
                        <div class="note">
                            Nhập nick yahoo (nick chat).
                        </div>
                    </div>
                </div>
                <%--  <div class="field">
                    <div class="label">
                        <label for="input-small">
                            Số điện thoại :</label>
                    </div>
                    <div class="input">
                        <asp:TextBox ID="txtPhone" runat="server" CssClass="medium" MaxLength="15" />
                    </div>
                </div>--%>
                <div class="buttons">
                    <asp:Button ID="btnUpdate" runat="server" ToolTip="   Đồng ý   " Text="Đồng ý" OnClick="btnInsert_Click" />
                    <input id="btnAdd" type="button" value="Thêm mới" />
                </div>
            </div>
        </div>
    </div>
</div>
